<template>
	<view class="page">
		<jyf-parser :html="html" ref="article"></jyf-parser>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: '',
				html: ''
			};
		},
		onLoad(opt) {
			this.id = opt && opt.id
			this.getHtml()
		},
		methods: {
			getHtml() {
				 this.$http.get(this.$api.couponDetail, {id: this.id}).then(res => {
					 if (res.code === 200) {
						 this.html = res.data.content
					 }
				 })
			}
		}
	}
</script>

<style lang="scss" scoped>
.page {
	padding: 30rpx;
	min-height: 100vh;
	background-color: #fff;
}
</style>
